package yjj.system.monitor;

import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 自定义监控信息
 */
@Component
public class ActuatorInfoConfig implements InfoContributor {
    @Override
    public void contribute(Info.Builder builder) {
        builder.withDetail("author", "yjj");
        //yyyy-MM-dd HH:mm:ss
        builder.withDetail("startTime", LocalDateTime.now().toString());
    }
}
